package com.youlai.boot.system.model.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

/**
 * 字典数据实体对象
 *
 * @author haoxr
 * @since 2022/12/17
 */
@Getter
@Setter
@Table(value = "sys_dict_data")
public class SysDictDataEntity {
    @Schema(description = "主键ID")
    @Id(keyType = KeyType.Auto)
    private Long id;

    @Schema(description = "字典编码")
    @Column(value = "dict_code")
    private String dictCode;

    @Schema(description = "字典项名称")
    @Column(value = "label")
    private String label;

    @Schema(description = "字典项值")
    @Column(value = "value")
    private String value;

    @Schema(description = "排序")
    @Column(value = "sort")
    private Integer sort;

    @Schema(description = "状态（1-正常，0-禁用）")
    @Column(value = "status")
    private Integer status;

    @Schema(description = "备注")
    @Column(value = "remark")
    private String remark;

    @Schema(description = "标签类型")
    @Column(value = "tag_type")
    private String tagType;

    @Schema(description = "创建时间")
    @Column(value = "created_at", onInsertValue = "now()")
    private Date createdAt;

    @Schema(description = "更新时间")
    @Column(value = "updated_at", onInsertValue = "now()", onUpdateValue = "now()")
    private Date updatedAt;
}